var a = getApp();

Page({
  data: {
    hideFalg: !1
  },
  onLoad: function (a) {
    var g_id = a.g_id
    this.setData({
      g_id: g_id
    });
    this.getGonggao(g_id)
  },
  previewImage: function (a) {
    console.log(a);
    var t = this;
    this.setData({
      hideFalg: !0
    });
    a.currentTarget.dataset.index;
    wx.previewImage({
      current: a.target.dataset.url,
      urls: t.data.noticeDetail.messageImage
    });
  },
  onReady: function () { },
  onShow: function () {

  },
  onHide: function () {
    this.data.hideFalg || this.setData({
      hideFalg: !1
    });
  },
  onUnload: function () { },
  delBtn: function () {
    var t = this;
    var g_id = t.data.g_id
    wx.showModal({
      title: "确实删除吗？",
      confirmColor: "#3b4ca9",
      success: function (e) {
        e.confirm ? a.util.request({
          'url': 'entry/wxapp/Studio.delete',
          data: {
            g_id: g_id
          },
          success: function (res) {
            console.log(res)
          }
        }) : e.cancel;
      }
    });
  },
  getGonggao: function (g_id) {
    var that = this
    a.util.request({
      'url': 'entry/wxapp/Studio.addgongg',
      data: {
        g_id: g_id
      },
      success: function (res) {
        console.log(res)
        that.setData({
          noticeDetail: res.data
        })
      }
    })
  }
});